#include <iostream>
#include <vector>
#include <boost/functional/factory.hpp>
#include <boost/typeof/typeof.hpp>
using namespace boost;
using namespace std;

class Demo
{
public:
    Demo() {
        pv.push_back(f());
    }
private:
    factory<int*> f;
    vector<int*> pv;
};

int main()
{
    cout << "--- Start ---" << endl;
    BOOST_AUTO(f_int, factory<int*>());
    int *p = f_int();
    *p = 12;

    Demo d;
    (void)d;
    cout << "--- End ---" << endl;
    return 0;
}
